<html>
<head>
<title>测试</title>
	<script type="text/javascript" src="/js/lib/require.js"></script>
    <script type="text/javascript" src="/js/require.config.js"></script>
	<script>
		require(["common","core"],function (jSouper) {
			require(["coAjax"],function (coAjax) {
				App.set("$Event.submit",function () {

					coAjax.post("http://dev.dotnar.com:3000/hehe",
					{
						name:App.get("$Cache.name"),
						password:App.get("$Cache.password"),
					} ,function (result) {
						var data = result.result;
						App.set("$Cache.data", data);
						alert("success",data.name+"|"+data.password)
					},function (argument) {
						alert("error","请求出错")
					});

				});
				removeLoader();
			});
		});
	</script>
</head>
<body>
	<div id="jSouperApp">
		<input type="text" value="{{$Cache.name}}" input-bind="{{'$Cache.name'}}">
		<input type="text" value="{{$Cache.password}}" input-bind="{{'$Cache.password'}}">
		<button event-click="{{'$Event.submit'}}">提交</button>
	</div>
</body>
</html>